import deepcopy from 'deepcopy'
export const baseValidate = {
  name: [{
    required: true,
    message: '属性分组名称',
    trigger: 'blur'
  },
  {
    type: 'string',
    min: 2,
    max: 20,
    message: '属性分组名称长度必须是2~20字符',
    trigger: 'blur'
  }],
  categoryId: [{
    required: true,
    message: '商品分类不能为空',
    trigger: 'blur'
  }],
  sort: [
    {
      type: 'number',
      max: 100,
      min: 0,
      trigger: 'blur',
      message: '排序只能0~100的整数'
    }
  ],

  description: [
    {
      max: 255,
      message: '分组描述不能大于255个字符',
      trigger: 'blur'
    }
  ]

}
export const addValidate = deepcopy(baseValidate)
export const editValidate = deepcopy(baseValidate)
